 |
|
 |
Subject: How to open connection through proxy with Java-agent (Domino 8.5.2)? |
 |
 |
 |
Product Area: Notes Client |
 |
Technical Area: Application Development |
 |
Platform: Windows |
 |
Release: 8.5.2 |
 |
Reproducible: Always |
 |
 |
 |
 |
Hello, I have troubles with using proxy from java-agent.
I develop simple Java-agent and I faced with the fact, that connection through proxy doesn't work from domino 8.5.2 or, maybe, I do something wrong.
I tried 2 methods
1. set system properties
System.setProperty("http.proxySet", "True");
System.setProperty("http.proxyHost", "proxy-server-address");
System.setProperty("http.proxyPort", "3128");
and I changed file "java.policy" (located at notes\jvm\lib\security )
permission java.util.PropertyPermission "http.proxySet", "write";
permission java.util.PropertyPermission "http.proxyHost", "write";
permission java.util.PropertyPermission "http.proxyPort", "write";
I don't know why, but this method doesn't work - java agent ignores proxy-settings (I rebooted LOtus and OS).
2. In J2SE 1.5 was implemented new class java.net.Proxy and method in java.net.URL-class to support it (URL.openConnection(Proxy proxy)).
SocketAddress pa = new InetSocketAddress(proxyAddress, proxyPort);
Proxy proxy = new Proxy(Proxy.Type.HTTP, pa);
URL url = null;
InputStream inputStream = null;
HttpURLConnection http_conn = null;
try {
url = new URL("http://www.site.ru/simpledata.zip");
http_conn = (HttpURLConnection)url.openConnection(proxy);
}
catch (MalformedURLException e1) {
e1.printStackTrace();
}
catch (IOException e1) {
e1.printStackTrace();
}
This code work in eclipse with Lotus jvm, but doesn't working from java-agent with exception
java.lang.UnsupportedOperationException: Method not implemented.
at java.net.URLStreamHandler.openConnection(URLStreamHandler
I think that is because in IBM URLStreamHandler implementation ( COM.ibm.JEmpower.applet.http.Handler and COM.ibm.JEmpower.applet.http.HttpURLConnection) doesn't implemented method openConnection with proxy.
But, why first method doesn't work I can't understand
p.s. sorry for my English, thanks for reading and help
 
Feedback number WEBB8ADHKP created by ~Vijay Zenfoobergettu on 10/19/2010

Status: Open
Comments:

How to open connection through prox... (~Vijay Zenfoobe... 19.Oct.10)
. . permissions (~Pippy Quetjumi... 19.Oct.10)
. . Any solution??? (~Bill Mingerote... 26.May.11)
. . Server Document settings (~Judy Fezweberg... 22.Feb.11)
. . . . 407 proxy authentication error SOLV... (~Tony Minvelute... 12.Sep.14) |
|  |
|